const router = require('koa-joi-router')
const category = router()
const Joi = router.Joi
const categoryCtrl = require('../controller/category')
category.prefix('/category')
category.route({
  method: 'get',
  path: '/getList',
  validate: {
    query: {
      page: Joi.number().default(1),
      page_size: Joi.number().default(20)
    }
  },
  handler: categoryCtrl.getList
})

module.exports = category
